import React from 'react';
import './index.less';

export interface Props {
  title: string | JSX.Element;
  extra?: string | JSX.Element;
}
const Index: React.FunctionComponent<Props> = (props) => {
  const { title, extra } = props;
  return (
    <div className="hr-title">
      <div className="hr-title-content">
        <div className="hr-title-box">
          <span className="hr-title-icon" />
        </div>
        {title}
      </div>
      {extra ? <div className="hr-title-extra">{extra}</div> : null}
    </div>
  );
};

export default Index;
